fixed used module functionality, added error messages
bugfixes, and changed UID variable to ID