Added recursive scan for inner classes
Added constructor to scan