Made improvments on module functions.