Clean up code and remove unnecessary methods