extract classes as files
cleanupo code
possible null reference xception