Added comment $post_id detection

Signed-off-by: Elliot Condon <e@elliotcondon.com>
Minor refactors

Signed-off-by: Elliot Condon <e@elliotcondon.com>