Revert "Couple of patches to make Robolectric happy"

This reverts commit 43378f7e6328779e8f0bee545c19c31eb4af4736.

That commit was a mistake when I've staged changes that shouldn't have been committed and did not stage stuff that I actually needed to commit.
(Now THE right changes) Couple of patches to make Robolectric happy

Main issue is LayoutInflater not properly initialised, maybe this could be solved with Robolectric's custom class loaders or something.