Consolidated simple functions into agent.py.
General cleanup.
Removed remaining Matlab file.