Add options, remove debug and make dynamic