clean style and code a bit