Hopefully this fixes #222

This might fix issue #222 - can't tell, because I could not reproduce it.
Moved "open account if there is only one" call
Refactored Repository Controllers