app working correctly; still needs commenting on some functions