Some optimisations
Merge pull request #18 from Yukariin/master

Some optimisations