Initial working version

This is the initial brute force version that works without any known
issues.