Forked to add modifications from TouchBD-iOS