Done button for adding modules

- general clean up of code