Updated loader class to handle themes