Revision 1.1

Some simple issues resolved and some refactoring.