refactoring and adding a timer and more functionality

refactoring and adding a timer and more functionality

Signed-off-by: riabop <riabop@gmail.com>
Merge pull request #6 from riabop/develop

Refactoring and adding a timer and more functionality. Forever and ever me and myself agree with this.