Fixed broken tests and made aplication overridable