animation using classes for easier code handling

untested, uncompiled...