Refactored interface specific functions into its own file.
Moved interface specific functions to interface.js