Fixed pesky require undefined and angular undefined errors