Merge changes I made

See the commits for details