Fix bug in function signature
Restructuring and clean up of posts repo