Angular controller tweaks and null checks etc