Fixed get_query_set deprectaion warning and some small PEP8 fixes