Cleaned up old gorp code
Bug fix in settings template