Added more functionality and little style change