Extra checking, fixed naming problems/whatnot