Improved

Added some better approaches and tidied the code a little bit.
@markgoodyear Please, don't forget to upload version (didn't want to mess with your version style).