split up the code for angular modules