Move delimiters to the end
Make some dynamically allocated strings static
Clean up code style