1. added primitive definition indirection ("like")
2. added definition of scalar types
3. little bit of cleanup
4. some minor bug fixes

Signed-off-by: dvorkinista <villain@noironetworks.com>