bunch of changes, hope this doesn't break stuff