Bugfix and cleared up dependencies