Minor additions - should now work at a basic level
Debugging
More debugging
Optimization