Code cleanup & namespace for pushState.