Add unit tests
Add optimizations -O3 flag
New check, some formatting
Fix errors in comments