Refactor test

Test methods to top and remove unused methods.
Fix bug in editCodeElement

organisaatioOid was undefined.