Fixed UI inheritance, some Cleanup & Refactoring