Removed (most) compilation warnings

I left two compilation warnings what may be errors
```erlang
%% @TODO: 
```