Updated in conjuction with Zuxelus' source. New stuff added, works much
better as well.