Fix bad function name, test for layer, remove console outputs