fixed cs, added validation and added tests for APC checks

Wasn't quite sure how to test the actual check, any suggestions?