Introduced unit testing

Created unit tests for each of the features available in component-hint. Also restructured some pieces to make unit testing simpler. Lastly fixed some minor issues I found along the way.
nope, will fix it