add Resource class; :dolphin: separate class to prevent memory leaks
Ref #115

tick version