Cleaned up code and removed unnecessary resources.