Windows support restored, basic exception handling added