Upload of complete example, could use a few more test cases and needs some ui refinements.