Cleaned up classes & functions