minor fixes (PEP8, ide warnings); added type checker; added doctype