Style of appendix changed (now package appendix is used). Caption position of listings is set to bottom by default. Package booktabs is now included for nicer tables. Keywords added to the abstract. Several bad boxes fixed.