Static serving of files
Major refactoring
added primary attribute to model