Get rid of legacy function and fix some init stuff
Add a rewrite rule to access posts by type. Fixes #2 on the way