Started work on swotch module, added error class (other classes need to be changed to be using it), added more tests