Solved some epic JS bugs. Got error checking working