Code cleaning, added return codes, added config argument, added usage