Slight optimization

Moved binary check to first check.. still need to consider a better way
to add padding, it's pretty primitive.