Restructured library files

I also added the lambda shortcut '->'