Added max depth. Added username from command line