Added basic rewrite rules, fixes #2