Better GetPosts js + some PEP8 fixes