Added a dev option
Various fixs