Fixed bug in tech check, made logging more specific, added helper functions.