Performance improvements

This pull request contains two performance improvements. Details can be found in: https://github.com/uProxy/libfte/issues/13.