Initial code review of current code base

This would also help separate the business logic from the UI