Fixing literal parsing and adding tests