Code refactoring, updated UI interface.