Bug fixes, media fix, windows compatibility added