Added a default profile and cleaned up some code.