Restructured code for better readability
Clean up, version 0.2.2