Several minor optimizations & refactorings
Merge branch 'master' of https://github.com/oguzdemir/bitirme