Conceptual integrity LSD
Added refactoring
Added first part of testing