NEW: cleaned up code and did first check in