Port things over from my mod to this library.

Signed-off-by: netchip <w00tc0d3@outlook.com>