fixed some incorrect constructions + codestyle