Cleaned up interface, removed a lot of unused functions