fix code style; remove unneeded code (improvments recommended by daspilker)