Several changes for i3.
Changed lots of things, too lazy to comment it all.