Dev

Complete rewrite