Added Angular logic, numerous other changes