Most issues resolved. Unit tests pending