Cleaned up code used for debugging