Reverted dev dependency
Slightly reorganised to allow commandline and code usage