Changed up error handling. Now using custom asserts with custom error messages.