Added register_element(), sanity checks on selectors & elements at registration time
Unit tests for exceptions