cleanup
added semantic rules