Core logic and docblock cleanup

Signed-off-by: Darren Hill <dchill42@gmail.com>