Extract sidebar variables
Refactor path-discerning code
Remove debug code

WHERPS.
Refactor whitespace
Load Location model
Check for required array length
Fix reference to request path
Remove use of Auth component
Fix use of TextHelper
Refactor whitespace
Move JS code into buffer
Fix use of TextHelper
Fix use of TextHelper
Fix use of TextHelper