Fixed repo admin routing issues with directories
Some more code clean-up