Added aliases.
Some refactoring and beautifying.