Made new improvements big time

So I added some functions to the core for working with routing and other
rules. Also defined layouts and other setup parts.