Eliminated all warnings.
Cleaned up code a little.
Fixed mine counter once again