cleaned up code and fixed initial tab order for commands layout.