Added function for removing job. And some restructur...sorry for that.