Introduced Predefined instances.

Some cleanup and corrections to logic and introduced some tests for Guides.

Additionally, the algorithms are defined in the Predef object, but we should see if
it should remain in the core library or be moved out.

Signed-off-by: Gary Pamparà <gpampara@gmail.com>