Edited for minor fixes