design ui and clean mess in code