Rearranged directories and made routes more dynamic