Misc changes

Added some tweaks and changed some small parts.