Initial commit based off of Ebsy's fork.