Cleaned up code base