Tests (for Epic) added. Some bugs fixed