Added language options and made some bug fixes