Fixed wrong variables and missing interfaces