dev: General improvment and tidy up