Re-implement sample project

Updated sample project, as well as fixed a few bugs.

Also added new sample page, to show performance differences between preprocessed and normal text.