Dev

Minor debugging and fixes