cleaned up code a bit, using literal object more effectively now.