Some beautification and clean up on create window