automated class discovery, some formating fixes