refactored to use angular recommended application structure