bunch of changes/improvements