Updated: Tweaked constants, fixed a few minor bugs