Improve code, change style