Oscap source

This is still WIP, but it perhaps makes sence to merge it now. It already improves performance (number of reads) by 2 or 3. Thoughts?