Clean up code. Added net40 support.