Moved locking functions in the locking.Lockable base class.
Added the cycle module which defines the Cycle class.