Tidied interface, removed obsolete functions