Cleaned up batchsim