Cleanup the base structure a little bit

Cleanup the base structure a little bit / Add smarty