Some refactoring (made interface more clear)