Reworked and tweaked some code