Optimizations

This branch contains:
- method execution speeded up
- clock feature fixing
- mac feature improvements
- mock option for tests
- more coverage added through mock
- pep8 compliance