Handling JS compilation + localStorage