Fixed bug with Add Profile where whitespace would be stripped from the name after checking if it was valid; creating a profile when importing data now strips whitespace; cleaned up add_profile().