Fixed up example;
Added initial functionality with tests;