Added some interface capabilities and refactored some code