Cleaned up code a little while on train