Complete rewrite of addon