Removed obsolete functions and variables, added settings interface.