Removed boilerplate code + cleaned up code