Added docs
Added file passing, implemented template expansion