Made more generic functions for the cooldowns

And added documentation to the newly added functions in pole.js and
powerup.js