implemented core tests for aliases, fixed some bugs