Fixed issues with refactored code, added some layout polish.