A few minor improvements. Get rid of eval()... What was I thinking?