Added business layer. Fixes in repositories.