Fixed some warnings
cleanup, fixed problem of ignored lineOrigin.y #490, part of #488