Rewrite of the base structure and implementation of very basic functionality