API and config changes (Part 1)

Added more API commands and the first part of the new config system