Make the core code a bit saner.
Fixed URL issues