New static api

The current API for static files(files in page) is very unstructered and uncommon to use. This is a try to make it more use- and extendable.