Improved version, all bonuses are ready. Some new tests added.