Cleaned up and corrected code

Signed-off-by: Levi Gross <levi@levigross.com>