Optimizing Code

This closes pixeldesu/teabag#1