More Minor fixes

Made it more generic, tidied areas up, shortened arguments.
Merge pull request #2 from izx64/patch-2

More Minor fixes