Cleaned up code and started adding domain specific code.