Added configuration load/save functionality, refactored code. More refactoring necessary (PinsConf in particular)