removed print statements; housekeeping
fixed dynamic reallocation for b
added folder hierarchy to inputs