shortened log output and fixed a few bugs