Implement basic saving of vars, add configuration