several tweeks, couple bugfixes