Bug fixes and move config