Refactored code for the bazillionth time. Also finally added node-animation helper functions.