Added timing class (better time measuring), rectangle detection, randomed position of barriers