Some minor changes. Now input is from args