Added input file to directory for testing.
Restructured backend and middle to be more independant from one another.
Added basic exception handling.