Optimization

- Removed duplicate function-calls
- Now counting free spaces outside of loop
It's almost 10x faster!