UI + some code cleanup