Fix saving the configuration
Fix infinite loop when looking for trailing spaces
Move sources to the sources/ directory