Tests added. Fixes made.