Improved Angular architecture. Relates to #4