Fixed indentation and other minor bugs