Fixed routing issues and added a front controller feature