Added tales top. Refactoring and bug fixes.