Refactor code to nib based theme