Cleaning up, documentation and added upgrade procedures