Adding test and implementation for type aliases

Fixing issue #17.