Stylized code (hah) and more fixes for activity NPE