Restructure angular app. Fix #223.