Account adding logic
Some refactoring, stripping from unused code
Extra changes
Error fixed